<div [@routerTransition]>
    <div class="content d-flex flex-column flex-column-fluid">

        <sub-header [title]="'WeShop' | localize" [description]="'WeShop' | localize">
            <div action="back"><i class="icon-fanhui text-info" (click)="goBack()"></i></div>
            <div role="actions"></div>
        </sub-header>

        <div [class]="containerClass">
            <div class="card card-custom gutter-b">
                <div class="card-body">
                    <tabset class="fortuneTabset">
                        <tab heading="{{l('BaseMsg')}}" customClass="kt-tabs__item">

                            <form #basicForm='ngForm' name="ProductsForm" (ngSubmit)="save()" novalidate=""
                                style="position:relative;">
                                <div class="freeze-ui" style="position:absolute;" *ngIf="showFreezeUi"></div>
                                <div class="row">
                                    <div class="col-8">
                                        <div class="row">
                                            <div class="form-group col-6">
                                                <label>{{l("name")}} *</label>
                                                <input class="form-control" type="text" name="displayName"
                                                    [(ngModel)]="basic.displayName" required maxlength="128">
                                            </div>
                                            <div class="form-group col-6">
                                                <label>{{l("outerId")}}</label>
                                                <input class="form-control" type="text" name="outerId"
                                                    [(ngModel)]="basic.outerId">
                                            </div>
                                        </div>

                                        <div class="row">
                                            <div class="form-group col-3">
                                                <label>{{l("phone")}}</label>
                                                <input class="form-control" type="number" name="phoneNumber"
                                                    [(ngModel)]="basic.phoneNumber">
                                            </div>
                                            <div class="form-group col-3">
                                                <div class="form-group kt-form__group align-items-center">
                                                    <label>{{l("auditStatus")}}</label>
                                                    <div class="input-group">
                                                        <select class="form-control" [(ngModel)]="basic.status"
                                                            name="status">
                                                            <option value="0">{{l('offline')}}</option>
                                                            <option value="1">{{l('online')}}</option>
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-group col-3" style="position:relative;">
                                                <label class="checkbox checkbox-primary"
                                                    style="position:absolute;top:50%;">
                                                    <input [(ngModel)]="basic.needCertification"
                                                        type="checkbox"
                                                        name="NeedCertification " />{{l("NeedCertification ")}}
                                                    <span></span>
                                                </label>
                                            </div>
                                            <div class="form-group col-3" *ngIf="basic.needCertification">
                                                <label>{{l("CertificationUrl ")}}</label>
                                                <input class="form-control" type="text" name="CertificationUrl "
                                                    [(ngModel)]="basic.certificationUrl">
                                            </div>


                                            <div class="form-group col-6">
                                                <label>{{l("WeShop")}}{{l("URL")}}</label>
                                                <input class="form-control" type="text" name="shopUrl"
                                                    [(ngModel)]="basic.shopUrl">
                                            </div>
                                            <div class="form-group col-6">
                                                <label>{{l("PublicAccount")}}</label>
                                                <div class="input-group">
                                                    <select class="form-control" [(ngModel)]="basic.publicAccountId"
                                                        name="publicAccountId">
                                                        <option value=""></option>
                                                        <option [value]="item.id"
                                                            *ngFor="let item of publicAccountList">
                                                            {{item.nickName}}</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group col-4">
                                                <label>{{l("orderAllowRefundDays")}}</label>
                                                <input class="form-control" type="number" name="orderAllowRefundDays"
                                                    [(ngModel)]="basic.orderAllowRefundDays">
                                            </div>
                                            <div class="form-group col-4">
                                                <label>{{l("orderAutoCloseDays")}} (0~60)</label>
                                                <input class="form-control" type="number" name="orderAutoCloseDays"
                                                    [(ngModel)]="basic.orderAutoCloseDays"
                                                    pattern="^([1-5]{0,1}[0-9]|60)$">
                                            </div>
                                            <div class="form-group col-4">
                                                <label>{{l("orderAutoSignDays")}}</label>
                                                <input class="form-control" type="number" name="orderAutoSignDays"
                                                    [(ngModel)]="basic.orderAutoSignDays">
                                            </div>



                                            <div class="form-group col-12">
                                                <label>{{l("Store")}}{{l("address")}}</label>
                                                <input class="form-control" type="text" name="address"
                                                    [(ngModel)]="basic.address">
                                            </div>
                                            <div class="form-group col-12">
                                                <label>{{l("refundAddress")}}</label>
                                                <input class="form-control" type="text" name="refundAddress"
                                                    [(ngModel)]="basic.refundAddress">
                                            </div>
                                            <div class="form-group col-12">
                                                <label>{{l("description")}}</label>
                                                <input class="form-control" type="text" name="description"
                                                    [(ngModel)]="basic.description">
                                            </div>
                                        </div>




                                    </div>
                                    <div class="col-4">
                                        <div class="form-group kt-form__group">
                                            <label class="control-label">{{l("logo")}}</label>
                                            <app-fileupload [fileUrl]="basic.logoUrl"
                                                (onUpLoadEvent)="onUpload($event)">
                                            </app-fileupload>
                                        </div>
                                    </div>
                                </div>


                                <div class="col-12 text-right">
                                    <button class="btn btn-primary" (click)="goBack()">{{l('Back')}}</button>
                                    <button class="btn btn-primary" [disabled]="!basicForm.form.valid" type="submit">
                                        <i class="fa fa-save"></i>{{l('Save')}}</button>
                                </div>
                            </form>



                        </tab>
                        <tab heading="{{l('Swiper')}}" customClass="kt-tabs__item" (selectTab)="getShopSliders($event)">
                            <div class="row">
                                <form class="horizontal-form" autocomplete="off">
                                    <div class="kt-form kt-form--label-align-right">
                                        <div class="row align-items-center m--margin-bottom-10">
                                            <div class="col-4">
                                                <div class="form-group kt-form__group align-items-center">
                                                    <div class="input-group">
                                                        <input [(ngModel)]="swiperFilter" name="swiperFilter" autoFocus
                                                            class="form-control kt-input" [placeholder]="l('Name')"
                                                            type="text">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-1">
                                                <div class="form-group kt-form__group align-items-center">
                                                    <div class="input-group">
                                                        <button type="button" class="btn btn-primary"
                                                            [buttonBusy]="SwiperPrimeng.isLoading"
                                                            (click)="getShopSliders()">
                                                            <i class="la la-refresh"></i>
                                                            {{l("search")}}
                                                        </button>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-7 text-right">
                                                <button type="button" (click)="createSwiper()"
                                                    class="btn btn-primary blue">
                                                    <i class="fa fa-plus"></i> {{l("add")}}{{l("Swiper")}}</button>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="row align-items-center">
                                <!--<Primeng-Datatable-Start>-->
                                <div class="primeng-datatable-container" [busyIf]="SwiperPrimeng.isLoading">
                                    <!-- resizableColumns="SwiperPrimeng.resizableColumns" -->
                                    <p-table #SwiperTable (onLazyLoad)="getShopSliders($event)"
                                        [value]="SwiperPrimeng.records"
                                        [rows]="SwiperPrimeng.defaultRecordsCountPerPage" [paginator]="false"
                                        [lazy]="false" [resizableColumns]="SwiperPrimeng.resizableColumns"
                                        responsive="SwiperPrimeng.isResponsive">
                                        <ng-template pTemplate="header">
                                            <tr>
                                                <th>{{l('Actions')}}</th>
                                                <th style="width:5%">{{l('RecordId')}}</th>
                                                <th>
                                                    {{l('name')}}
                                                </th>
                                                <th>
                                                    {{l('Picture')}}
                                                </th>
                                                <th>{{l('sort')}}</th>
                                                <th>
                                                    {{l('URL')}}
                                                </th>
                                            </tr>
                                        </ng-template>
                                        <ng-template pTemplate="body" let-record let-i="rowIndex">
                                            <tr [pSelectableRow]="record" [attr.trid]="record.id">
                                                <td>
                                                    <div class="btn-group dropdown" dropdown normalizePosition>
                                                        <button class="dropdown-toggle btn btn-sm btn-primary"
                                                            data-toggle="dropdown" dropdownToggle aria-haspopup="true"
                                                            aria-expanded="false">
                                                            <i class="fa fa-cog"></i>
                                                            <span class="caret"></span> {{l("Actions")}}
                                                        </button>
                                                        <ul class="dropdown-menu" *dropdownMenu>
                                                            <li>
                                                                <a class="icon-bianji dropdown-item"
                                                                    (click)="editSwiper(record)">{{l('Edit')}}</a>
                                                            </li>
                                                            <li>
                                                                <a class="icon-icon-test dropdown-item"
                                                                    (click)="deleteSwiper(record)">{{l('Delete')}}</a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </td>
                                                <td> {{transIndex(i,SwiperPaginator,SwiperPrimeng)}}</td>
                                                <td>
                                                    <span>{{record.displayName}}</span>
                                                </td>
                                                <td>
                                                    <img [src]="fixFileUrl(record.pictureUrl)" />
                                                </td>

                                                <td>
                                                    <span>{{record.orderNumber}}</span>
                                                </td>
                                                <td>
                                                    <span>{{record.turnUrl}}</span>
                                                </td>
                                            </tr>
                                        </ng-template>
                                        <ng-template pTemplate="emptymessage" let-records>
                                            <tr *ngIf="SwiperPrimeng.records">
                                                <td colspan="6">
                                                    <img class="emptymessage"
                                                        src="/assets/common/images/placeholder/productinfoHolder.png" />
                                                </td>
                                            </tr>
                                        </ng-template>
                                    </p-table>
                                    <div class="primeng-paging-container">
                                        <p-paginator [rows]="SwiperPrimeng.defaultRecordsCountPerPage" #SwiperPaginator
                                            (onPageChange)="getShopSliders($event)"
                                            [totalRecords]="SwiperPrimeng.totalRecordsCount"
                                            [rowsPerPageOptions]="SwiperPrimeng.predefinedRecordsCountPerPage">
                                        </p-paginator>
                                        <span class="total-records-count">
                                            {{l('TotalRecordsCount', SwiperPrimeng.totalRecordsCount)}}
                                        </span>
                                    </div>
                                </div>
                                <!--<Primeng-Datatable-End>-->
                            </div>
                        </tab>
                        <tab heading="{{l('ProductCategory')}}" customClass="kt-tabs__item"
                            (selectTab)="getProductCategory($event)">
                            <div class="row">
                                <form class="horizontal-form" autocomplete="off">
                                    <div class="kt-form kt-form--label-align-right">
                                        <div class="row align-items-center m--margin-bottom-10">
                                            <div class="col-4">
                                                <div class="form-group kt-form__group align-items-center">
                                                    <div class="input-group">
                                                        <input [(ngModel)]="categoryFilter" name="categoryFilter"
                                                            autoFocus class="form-control kt-input"
                                                            [placeholder]="l('SearchWithThreeDot')" type="text">
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-1">
                                                <div class="form-group kt-form__group align-items-center">
                                                    <div class="input-group">
                                                        <button type="button" class="btn btn-primary"
                                                            [buttonBusy]="categoryPrimeng.isLoading"
                                                            (click)="getProductCategory()">
                                                            <i class="la la-refresh"></i>
                                                            {{l("search")}}
                                                        </button>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-7 text-right">
                                                <!-- <button type="button" (click)="deleteCategoryList()" class="btn btn-primary blue">
                                                    <i class="icon-piliangcaozuo"></i> {{l("deleteBatch")}}</button> -->
                                                <button type="button" (click)="createCategory()"
                                                    class="btn btn-primary blue">
                                                    <i class="fa fa-plus"></i>
                                                    {{l("add")}}{{l('ProductCategory')}}</button>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>

                            <div class="row align-items-center">
                                <div class="primeng-datatable-container" [busyIf]="categoryPrimeng.isLoading">
                                    <p-table #categoryTable (onLazyLoad)="getProductCategory($event)"
                                        [value]="categoryPrimeng.records"
                                        [rows]="categoryPrimeng.defaultRecordsCountPerPage" [paginator]="false"
                                        [lazy]="false" [(selection)]="categoryCheckedList"
                                        [resizableColumns]="categoryPrimeng.resizableColumns"
                                        responsive="categoryPrimeng.isResponsive">
                                        <ng-template pTemplate="header">
                                            <tr>
                                                <th>{{l('Actions')}}</th>
                                                <!-- <th style="width: 5.0em">
                                                <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
                                            </th> -->
                                                <th style="width:5%">{{l('RecordId')}}</th>
                                                <th>
                                                    {{l('name')}}
                                                </th>
                                                <th>
                                                    {{l('Picture')}}
                                                </th>
                                                <th>{{l('sort')}}</th>
                                                <!-- <th>
                                                {{l('URL')}}
                                            </th> -->
                                            </tr>
                                        </ng-template>
                                        <ng-template pTemplate="body" let-record let-i="rowIndex">
                                            <tr [pSelectableRow]="record" [attr.trid]="record.id">
                                                <td>
                                                    <div class="btn-group dropdown" dropdown normalizePosition>
                                                        <button class="dropdown-toggle btn btn-sm btn-primary"
                                                            data-toggle="dropdown" dropdownToggle aria-haspopup="true"
                                                            aria-expanded="false">
                                                            <i class="fa fa-cog"></i>
                                                            <span class="caret"></span> {{l("Actions")}}
                                                        </button>
                                                        <ul class="dropdown-menu" *dropdownMenu>
                                                            <li>
                                                                <a class="icon-bianji dropdown-item"
                                                                    (click)="editCategory(record)">{{l('Edit')}}</a>
                                                            </li>
                                                            <li>
                                                                <a class="icon-icon-test dropdown-item"
                                                                    (click)="deleteCategory(record)">{{l('Delete')}}</a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </td>
                                                <!-- <th style="width: 5.0em">
                                                <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
                                            </th> -->
                                                <td> {{transIndex(i,categoryPaginator,categoryPrimeng)}}</td>
                                                <td>
                                                    <span>{{record.categoryName}}</span>
                                                </td>
                                                <td>
                                                    <img [src]="fixFileUrl(record.pictureUrl)" />
                                                </td>

                                                <td>
                                                    <span>{{record.orderNumber}}</span>
                                                </td>
                                                <!-- <td>
                                                <span>{{record.turnUrl}}</span>
                                            </td> -->
                                            </tr>
                                        </ng-template>
                                        <ng-template pTemplate="emptymessage" let-records>
                                            <tr *ngIf="categoryPrimeng.records">
                                                <td colspan="5">
                                                    <img class="emptymessage"
                                                        src="/assets/common/images/placeholder/productinfoHolder.png" />
                                                </td>
                                            </tr>
                                        </ng-template>
                                    </p-table>
                                    <div class="primeng-paging-container">
                                        <p-paginator [rows]="categoryPrimeng.defaultRecordsCountPerPage"
                                            #categoryPaginator (onPageChange)="getProductCategory($event)"
                                            [totalRecords]="categoryPrimeng.totalRecordsCount"
                                            [rowsPerPageOptions]="categoryPrimeng.predefinedRecordsCountPerPage">
                                        </p-paginator>
                                        <span class="total-records-count">
                                            {{l('TotalRecordsCount', categoryPrimeng.totalRecordsCount)}}
                                        </span>
                                    </div>
                                </div>
                                <!--<Primeng-Datatable-End>-->
                            </div>
                        </tab>
                        <tab heading="{{l('TagManagement')}}" customClass="kt-tabs__item" (selectTab)="getTags($event)">
                            <div class="row">
                                <form class="horizontal-form" autocomplete="off">
                                    <div class="kt-form kt-form--label-align-right">
                                        <div class="row align-items-center m--margin-bottom-10">
                                            <div class="col-4">
                                                <div class="form-group kt-form__group align-items-center">
                                                    <div class="input-group">
                                                        <input [(ngModel)]="tagFilter" name="tagFilter" autoFocus
                                                            class="form-control kt-input"
                                                            [placeholder]="l('SearchWithThreeDot')" type="text">
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-1">
                                                <div class="form-group kt-form__group align-items-center">
                                                    <div class="input-group">
                                                        <button type="button" class="btn btn-primary"
                                                            [buttonBusy]="tagPrimeng.isLoading" (click)="getTags()">
                                                            <i class="la la-refresh"></i>
                                                            {{l("search")}}
                                                        </button>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-7 text-right">
                                                <!-- <button type="button" (click)="deleteTagList()" class="btn btn-primary blue">
                                                            <i class="icon-piliangcaozuo"></i> {{l("deleteBatch")}}</button> -->
                                                <button type="button" (click)="createTag()"
                                                    class="btn btn-primary blue">
                                                    <i class="fa fa-plus"></i> {{l("CreateNewTag")}}</button>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>

                            <div class="row align-items-center">
                                <div class="primeng-datatable-container" [busyIf]="tagPrimeng.isLoading">
                                    <p-table #tagTable (onLazyLoad)="getTags($event)" [value]="tagPrimeng.records"
                                        [rows]="tagPrimeng.defaultRecordsCountPerPage" [paginator]="false"
                                        [lazy]="false" [(selection)]="tagCheckedList"
                                        [resizableColumns]="tagPrimeng.resizableColumns"
                                        responsive="tagPrimeng.isResponsive">
                                        <ng-template pTemplate="header">
                                            <tr>
                                                <th>{{l('Actions')}}</th>
                                                <!-- <th style="width: 5.0em">
                                                <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
                                            </th> -->
                                                <th style="width:5%">{{l('RecordId')}}</th>
                                                <th>
                                                    {{l('name')}}
                                                </th>
                                                <th>
                                                    {{l('Picture')}}
                                                </th>
                                                <th>{{l('type')}}</th>
                                                <!-- <th>
                                                {{l('URL')}}
                                            </th> -->
                                            </tr>
                                        </ng-template>
                                        <ng-template pTemplate="body" let-record let-i="rowIndex">
                                            <tr [pSelectableRow]="record" [attr.trid]="record.id">
                                                <td>
                                                    <div class="btn-group dropdown" dropdown normalizePosition>
                                                        <button class="dropdown-toggle btn btn-sm btn-primary"
                                                            data-toggle="dropdown" dropdownToggle aria-haspopup="true"
                                                            aria-expanded="false">
                                                            <i class="fa fa-cog"></i>
                                                            <span class="caret"></span> {{l("Actions")}}
                                                        </button>
                                                        <ul class="dropdown-menu" *dropdownMenu>
                                                            <li>
                                                                <a class="icon-bianji dropdown-item"
                                                                    (click)="editTag(record)">{{l('Edit')}}</a>
                                                            </li>
                                                            <li>
                                                                <a class="icon-icon-test dropdown-item"
                                                                    (click)="deleteTag(record)">{{l('Delete')}}</a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </td>
                                                <!-- <th style="width: 5.0em">
                                                <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
                                            </th> -->
                                                <td> {{transIndex(i,tagPaginator,tagPrimeng)}}</td>
                                                <td>
                                                    <span>{{record.tagName}}</span>
                                                </td>
                                                <td>
                                                    <img [src]="fixFileUrl(record.pictureUrl)" />
                                                </td>
                                                <td>
                                                    <span *ngIf="record.shopTag==0">{{l("left")}}</span>
                                                    <span *ngIf="record.shopTag==1">{{l("top")}}</span>
                                                    <span *ngIf="record.shopTag==2">{{l("bottom")}}</span>
                                                </td>
                                                <!-- <td>
                                                <span>{{record.turnUrl}}</span>
                                            </td> -->
                                            </tr>
                                        </ng-template>
                                        <ng-template pTemplate="emptymessage" let-records>
                                            <tr *ngIf="tagPrimeng.records">
                                                <td colspan="5">
                                                    <img class="emptymessage"
                                                        src="/assets/common/images/placeholder/productinfoHolder.png" />
                                                </td>
                                            </tr>
                                        </ng-template>
                                    </p-table>
                                    <div class="primeng-paging-container">
                                        <p-paginator [rows]="tagPrimeng.defaultRecordsCountPerPage" #tagPaginator
                                            (onPageChange)="getTags($event)"
                                            [totalRecords]="tagPrimeng.totalRecordsCount"
                                            [rowsPerPageOptions]="tagPrimeng.predefinedRecordsCountPerPage">
                                        </p-paginator>
                                        <span class="total-records-count">
                                            {{l('TotalRecordsCount', tagPrimeng.totalRecordsCount)}}
                                        </span>
                                    </div>
                                </div>
                                <!--<Primeng-Datatable-End>-->
                            </div>


                        </tab>
                        <tab heading="{{l('FreightSetting')}}" customClass="kt-tabs__item"
                            (selectTab)="getShopFreights($event)">
                            <div class="row">
                                <form class="horizontal-form" autocomplete="off">
                                    <div class="kt-form kt-form--label-align-right">
                                        <div class="row align-items-center m--margin-bottom-10">
                                            <div class="col-4">
                                                <div class="form-group kt-form__group align-items-center">
                                                    <div class="input-group">
                                                        <input [(ngModel)]="freightFilter" name="freightFilter"
                                                            autoFocus class="form-control kt-input"
                                                            [placeholder]="l('SearchWithThreeDot')" type="text">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-1">
                                                <div class="form-group kt-form__group align-items-center">
                                                    <div class="input-group">
                                                        <button type="button" class="btn btn-primary"
                                                            [buttonBusy]="freightPrimeng.isLoading"
                                                            (click)="getShopFreights()">
                                                            <i class="la la-refresh"></i>
                                                            {{l("search")}}
                                                        </button>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-7 text-right">
                                                <!-- <button type="button" (click)="deleteFreightList()" class="btn btn-primary blue">
                                                <i class="icon-piliangcaozuo"></i> {{l("deleteBatch")}}</button> -->
                                                <button type="button" (click)="createFreight()"
                                                    class="btn btn-primary blue">
                                                    <i class="fa fa-plus"></i> {{l("add")}}{{l("Freight")}}</button>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>

                            <div class="row align-items-center">
                                <div class="primeng-datatable-container" [busyIf]="freightPrimeng.isLoading">
                                    <p-table #freightTable (onLazyLoad)="getShopFreights($event)"
                                        [value]="freightPrimeng.records"
                                        [rows]="freightPrimeng.defaultRecordsCountPerPage" [paginator]="false"
                                        [lazy]="false" [(selection)]="freightCheckedList"
                                        [resizableColumns]="freightPrimeng.resizableColumns"
                                        responsive="freightPrimeng.isResponsive">
                                        <ng-template pTemplate="header">
                                            <tr>
                                                <th>{{l('Actions')}}</th>
                                                <!-- <th style="width: 5.0em">
                                                <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
                                            </th> -->
                                                <th style="width:5%">{{l('RecordId')}}</th>
                                                <th>
                                                    {{l('name')}}
                                                </th>
                                                <th>
                                                    {{l('shopShopFreightType')}}
                                                </th>
                                                <th>{{l('firstPrice')}}</th>
                                                <th>
                                                    {{l('secondPrice')}}
                                                </th>
                                                <th>
                                                    {{l('isDefault')}}
                                                </th>
                                                <th>
                                                    {{l('auditStatus')}}
                                                </th>

                                            </tr>
                                        </ng-template>
                                        <ng-template pTemplate="body" let-record let-i="rowIndex">
                                            <tr [pSelectableRow]="record" [attr.trid]="record.id">
                                                <td>
                                                    <div class="btn-group dropdown" dropdown normalizePosition>
                                                        <button class="dropdown-toggle btn btn-sm btn-primary"
                                                            data-toggle="dropdown" dropdownToggle aria-haspopup="true"
                                                            aria-expanded="false">
                                                            <i class="fa fa-cog"></i>
                                                            <span class="caret"></span> {{l("Actions")}}
                                                        </button>
                                                        <ul class="dropdown-menu" *dropdownMenu>
                                                            <li>
                                                                <a class="icon-bianji dropdown-item"
                                                                    (click)="editFreight(record)">{{l('Edit')}}</a>
                                                            </li>
                                                            <li>
                                                                <a class="icon-icon-test dropdown-item"
                                                                    (click)="deleteFreight(record)">{{l('Delete')}}</a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </td>
                                                <!-- <th style="width: 5.0em">
                                                <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
                                            </th> -->
                                                <td> {{transIndex(i,freightPaginator,freightPrimeng)}}</td>
                                                <td>
                                                    <span>{{record.displayName}}</span>
                                                </td>
                                                <td>
                                                    <span>{{record.shopShopFreightType}}</span>
                                                </td>
                                                <td>
                                                    <span>{{record.firstPrice}}</span>
                                                </td>
                                                <td>
                                                    <span>{{record.secondPrice}}</span>
                                                </td>
                                                <td>
                                                    <span *ngIf="record.isDefault"
                                                        class="kt-badge  kt-badge--success kt-badge--inline">{{l("Yes")}}</span>
                                                    <span *ngIf="!record.isDefault"
                                                        class="kt-badge  kt-badge--danger kt-badge--inline">{{l("No")}}</span>
                                                </td>
                                                <td>
                                                    <span *ngIf="record.status==1"
                                                        class="kt-badge  kt-badge--success kt-badge--inline">{{l("On")}}</span>
                                                    <span *ngIf="record.status==0"
                                                        class="kt-badge  kt-badge--danger kt-badge--inline">{{l("Off")}}</span>
                                                </td>

                                            </tr>
                                        </ng-template>
                                        <ng-template pTemplate="emptymessage" let-records>
                                            <tr *ngIf="freightPrimeng.records">
                                                <td colspan="8">
                                                    <img class="emptymessage"
                                                        src="/assets/common/images/placeholder/productinfoHolder.png" />
                                                </td>
                                            </tr>
                                        </ng-template>
                                    </p-table>
                                    <div class="primeng-paging-container">
                                        <p-paginator [rows]="freightPrimeng.defaultRecordsCountPerPage"
                                            #freightPaginator (onPageChange)="getShopFreights($event)"
                                            [totalRecords]="freightPrimeng.totalRecordsCount"
                                            [rowsPerPageOptions]="freightPrimeng.predefinedRecordsCountPerPage">
                                        </p-paginator>
                                        <span class="total-records-count">
                                            {{l('TotalRecordsCount', freightPrimeng.totalRecordsCount)}}
                                        </span>
                                    </div>
                                </div>
                                <!--<Primeng-Datatable-End>-->
                            </div>
                        </tab>



                        <tab heading="{{l('LogisticsSetting')}}" customClass="kt-tabs__item"
                            (selectTab)="getTrackKeyInfo()">

                            <form #LogisticsForm='ngForm' name="LogisticsForm" (ngSubmit)="saveTrack()" novalidate=""
                                style="position:relative;">
                                <div class="freeze-ui" style="position:absolute;" *ngIf="showFreezeUi"></div>
                                <div class="row">
                                    <div class="form-group col-6">
                                        <label>{{l("key")}} *</label>
                                        <input class="form-control" type="text" name="key" [(ngModel)]="track.key"
                                            required>
                                    </div>
                                    <div class="form-group col-6">
                                        <label>{{l("secret")}} *</label>
                                        <input class="form-control" type="text" name="secret" [(ngModel)]="track.secret"
                                            required>
                                    </div>
                                    <div class="form-group col-6">
                                        <label>{{l("from")}}</label>
                                        <input class="form-control" type="text" name="from" [(ngModel)]="track.from">
                                    </div>
                                </div>

                                <div class="col-12 text-right">
                                    <button class="btn btn-primary" [disabled]="!LogisticsForm.form.valid"
                                        type="submit">
                                        <i class="fa fa-save"></i>{{l('Save')}}</button>
                                </div>
                            </form>



                        </tab>

                        <tab heading="{{l('payWay')}}" customClass="kt-tabs__item" (selectTab)="payWayInit()">
                            <div class="freeze-ui" style="position:absolute;" *ngIf="showFreezeUi"></div>
                            <div class="row">
                                <div class="form-group col-6">
                                    <label>{{l("wxPay")}}</label>
                                    <div class="input-group">
                                        <select class="form-control" [(ngModel)]="paySetting.weixin.id" name="weixin">
                                            <option value="">{{l('None')}}</option>
                                            <option [value]="item.id" *ngFor="let item of payTypeList.weixin">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="col-12 text-right">

                                <button class="btn btn-primary" type="button" (click)="savePayWay()">
                                    <i class="fa fa-save"></i>{{l('Save')}}</button>
                            </div>

                        </tab>

                        <tab heading="{{l('scoreSetting')}}" customClass="kt-tabs__item">
                            <div class="freeze-ui" style="position:absolute;" *ngIf="showFreezeUi"></div>
                            <div class="row">
                                <div class="form-group col-6" *ngIf="basic.payPointRule">
                                    <label>{{l("payPointRule")}}</label>
                                    <div class="row">
                                        <div class="form-group col-6">
                                            <label>{{l("shopPointRule_payCashAmount")}}</label>
                                            <input class="form-control" type="text" name="shopPointRule_payCashAmount"
                                                [(ngModel)]="basic.payPointRule.shopPointRule.payCashAmount">
                                        </div>
                                        <!-- <div class="form-group col-6">
                                        <label>{{l("shopPointRule_awardPointAmount")}}</label>
                                        <input class="form-control" type="text" name="shopPointRule_awardPointAmount"
                                            [(ngModel)]="basic.payPointRule.shopPointRule.awardPointAmount">
                                    </div> -->
                                        <div class="form-group col-6">
                                            <label>{{l("devicePointRule_payCashAmount")}}</label>
                                            <input class="form-control" type="text" name="devicePointRule_payCashAmount"
                                                [(ngModel)]="basic.payPointRule.devicePointRule.payCashAmount">
                                        </div>
                                        <!-- <div class="form-group col-6">
                                        <label>{{l("devicePointRule_awardPointAmount")}}</label>
                                        <input class="form-control" type="text" name="devicePointRule_awardPointAmount"
                                            [(ngModel)]="basic.payPointRule.devicePointRule.awardPointAmount">
                                    </div> -->
                                    </div>
                                </div>
                                <div class="form-group col-6" *ngIf="basic.pointDeductionRule">
                                    <label>{{l("pointDeductionRule")}}</label>
                                    <div class="row">
                                        <!-- <div class="form-group col-6">
                                        <label>{{l("shopDeductionRule_payCashAmount")}}</label>
                                        <input class="form-control" type="text" name="shopDeductionRule_payCashAmount"
                                            [(ngModel)]="basic.pointDeductionRule.shopDeductionRule.payCashAmount">
                                    </div> -->
                                        <div class="form-group col-6">
                                            <label>{{l("shopDeductionRule_deductionPointAmount")}}</label>
                                            <input class="form-control" type="text"
                                                name="shopDeductionRule_deductionPointAmount"
                                                [(ngModel)]="basic.pointDeductionRule.shopDeductionRule.deductionPointAmount">
                                        </div>
                                        <!-- <div class="form-group col-6">
                                        <label>{{l("deviceDeductionRule_payCashAmount")}}</label>
                                        <input class="form-control" type="text" name="deviceDeductionRule"
                                            [(ngModel)]="basic.pointDeductionRule.deviceDeductionRule.payCashAmount">
                                    </div> -->
                                        <div class="form-group col-6">
                                            <label>{{l("deviceDeductionRule_deductionPointAmount")}}</label>
                                            <input class="form-control" type="text"
                                                name="deviceDeductionRule_deductionPointAmount"
                                                [(ngModel)]="basic.pointDeductionRule?.deviceDeductionRule.deductionPointAmount">
                                        </div>
                                    </div>
                                </div>

                            </div>
                            <div class="col-12 text-right">

                                <button class="btn btn-primary" type="button" (click)="save()">
                                    <i class="fa fa-save"></i>{{l('Save')}}</button>
                            </div>

                        </tab>


                    </tabset>
                </div>
            </div>
        </div>
        <SwiperModal #SwiperModal (modalSave)="getShopSliders()"></SwiperModal>
        <setCategoryModal #setCategoryModal (modalSave)="getProductCategory()"></setCategoryModal>
        <setTagModal #setTagModal (modalSave)="getTags()"></setTagModal>
        <setFreightModal #setFreightModal (modalSave)="getShopFreights()"></setFreightModal>
    </div>

</div>